package com.stylefeng.guns.common.persistence.dao;

import com.stylefeng.guns.common.persistence.model.PcServerInfo;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 后台pcip和cdkey表 Mapper 接口
 * </p>
 *
 * @author stylefeng
 * @since 2018-02-02
 */
public interface PcServerInfoMapper extends BaseMapper<PcServerInfo> {
    List<PcServerInfo> list(@Param("serverName") String serverName, @Param("ip") String ip,@Param("status") String status);

    PcServerInfo queryById(@Param("id") String id);
    Map<String, String> queryServerIpByaccount(@Param("account") String account);

    Map<String, String> checkIpUnique(@Param("ip") String ip);
    Map<String, String> checkMachineCodeUnique(@Param("machineCode") String machineCode);

    Map<String, String> checkIpChange(@Param("ip") String ip, @Param("id") String id);
}